//
//  BA_ShareActionView.m
//  BaseProject
//
//  Created by 王洋 on 2020/7/1.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "BA_ShareActionView.h"

@implementation BA_ShareActionView

- (void)awakeFromNib {
    [super awakeFromNib];
    
    [self.wechatFriendControl addGestureTapEventHandle:^(id  _Nonnull sender, UITapGestureRecognizer * _Nonnull gestureRecognizer) {
        if (self.BA_ShareActionViewBlock) {
            self.BA_ShareActionViewBlock(BA_ShareAction_wechatFriend);
        }
    }];
    
    [self.wechatCircleControl addGestureTapEventHandle:^(id  _Nonnull sender, UITapGestureRecognizer * _Nonnull gestureRecognizer) {
        if (self.BA_ShareActionViewBlock) {
            self.BA_ShareActionViewBlock(BA_ShareAction_wechatCircle);
        }
    }];
    
    [self.qqFriendControl addGestureTapEventHandle:^(id  _Nonnull sender, UITapGestureRecognizer * _Nonnull gestureRecognizer) {
        if (self.BA_ShareActionViewBlock) {
            self.BA_ShareActionViewBlock(BA_ShareAction_qqFriend);
        }
    }];
    
    [self.weiboControl addGestureTapEventHandle:^(id  _Nonnull sender, UITapGestureRecognizer * _Nonnull gestureRecognizer) {
        if (self.BA_ShareActionViewBlock) {
            self.BA_ShareActionViewBlock(BA_ShareAction_weibo);
        }
    }];
}


- (IBAction)closeAction:(id)sender {
    if (self.BA_ShareActionViewBlock) {
        self.BA_ShareActionViewBlock(BA_ShareAction_close);
    }
}

@end
